import java.util.Scanner;
public class Test20230808_3 {
    public static int cmp1(int a,int b){
        return a>b? a:b;
    }
    public static double cmp2(double a,double b,double c){
double d = a>b? a:b;
return d>c? d:c;
    }
    public static void main(String[] args){
Scanner scanner = new Scanner(System.in);
int a = scanner.nextInt();
int b = scanner.nextInt();
double c = scanner.nextDouble();
double d = scanner.nextDouble();
double g = scanner.nextDouble();
int e = cmp1(a,b);
double f = cmp2(c,d,g);
System.out.println(e);
System.out.println(f);
    }
}
